<?php
session_start();
 if(!isset($_SESSION['fl']))
{
	header("Location:booking.php");
}
$s=$_SESSION['$user'];



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="goplaces.css" />
<script type = "text/JavaScript" src = "payment.js">
    </script>
<?php

 
  $_SESSION['tripname']=$_POST['tripname'];
  $_SESSION['tripcode']=$_POST['tripcode'];
  $_SESSION['no_of_pass']=$_POST['no_of_pass'];
  $_SESSION['veg']=$_POST['veg'];
  $_SESSION['non_veg']=$_POST['non_veg'];
  $_SESSION['yn']=$_POST['yn'];
  
  $_SESSION['ty']=$_POST['ty'];
 $_SESSION['tm']=$_POST['tm'];
 $_SESSION['td']=$_POST['td'];

  $tripcode=$_POST['tripcode'];

  
  
  
 
  
  

  ?>


</head>

<body onload="getinfo()" >

<form name="payment" method="post" action="successPayment.php" onsubmit="return paymentvalidate()"  >
<div id="header">
		<a href="home.html" class="logo"><img src="images/logo.jpg" alt="" width="274" height="90" /></a>		
         		
  		<a class="facebook">  <iframe src="http://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FETrawels%2F132726943479075&amp;width=150&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:80px;" allowtransparency="true"></iframe></a>
 																														
	  <a href="http://twitter.com/etrawels" class="twitter-follow-button" data-show-count="false" >Follow @etrawels</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> 


		<ul id="menu">
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
			<li><a href="home.html" >Home Page</a></li>
			<li><a href="aboutus.html" >Company Profile</a></li>
			<li><a href="tours.html" >Tours and Packages</a></li>
			<li><a href="visa.html">Visa Procedures & Assistance</a></li>
			<li><a href="booking.php" >Bookings</a></li>
			<li><a href="feedback.php" >Feedback</a></li>
			<li><a href="Sitemap.html">Sitemap</a></li>
			<li><a href="maps.html" >Trip Planner</a></li>
			
	  </ul>
	</div>

<div id="bookwrapper">
<div id="bon">
<p><img src="images/one.gif" /> <img src="images/l2.gif" /><img src="images/l4.gif" /> <img src="images/l3.gif" /><img src="images/l5.gif" />
  <c>Step 3 of 3: Payment details, tickets and Bon Voyage!!!</c></p>
  </div>
  <div id="bookleft">
  The final Step: Please enter your payment details to get your e-tickets sent to your e mail id.
  Please make sure that you note down the book id at the end of this session 
  </div>
<div id="bookright">

  
  
  
  
  
  
<p>Trip name: <?php echo $_POST['tripname']?> </p>
<br />
<p>No.of.passengers: <?php echo $_POST['no_of_pass'] ?></p>
<br/>
<p>Trip Cost:
  <input type="hidden" name="totalcost" value="<?php $con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  $tripcode=$_POST['tripname'];
  mysql_select_db("ETrawelMart",$con); $sql2=mysql_query("SELECT * FROM  tours WHERE name='$tripcode'") or die(mysql_error()); $cost=mysql_fetch_array($sql2); ; $total=$cost['cost']*$_POST['no_of_pass']; echo $total; mysql_close($con); ?>" />
  
<?php $con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $tripcode=$_POST['tripname'];
 $sql2=mysql_query("SELECT * FROM  tours WHERE name='$tripcode'") or die(mysql_error()); 
 $cost=mysql_fetch_array($sql2);
  echo $cost['cost'];  
  mysql_close($con);?><input type="hidden" name="tripcost" value= "<?php $con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $tripcode=$_POST['tripname'];
 $sql2=mysql_query("SELECT * FROM  tours WHERE name='$tripcode'") or die(mysql_error()); 
 $cost=mysql_fetch_array($sql2);
  echo $cost['cost'];  
  mysql_close($con);?>  " /> </p>
  <br />
  
<p>Total Cost: <?php $con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  $tripcode=$_POST['tripname'];
  mysql_select_db("ETrawelMart",$con); $sql2=mysql_query("SELECT * FROM  tours WHERE name='$tripcode'") or die(mysql_error()); $cost=mysql_fetch_array($sql2); $no_of_pass=$_POST['no_of_pass']; $total=$cost['cost']*$no_of_pass; echo $total; mysql_close($con); $_SESSION['tot_cost']=$total; ?> </p>
<br /> 



<p>Payment Type:
  <select name="paymenttype">
     <option>--Select--</option>
    <option> VISA </option> 
    <option>MasterCard </option> 
    <option> PayPal </option>
  </select>
</p>
<p></p>
<br />
Name on the Card: <input type="text" name="cardname"/> <p> </p><br /><br />
Card Number: <input type="text" name="cardno" onkeypress="return chknum()" /><p></p><br />
CVV: <input type="password" name="cvv" size="3" onkeypress="return chknum()" /> <p> </p>
<br />
Date of Expiry:
 <select name="m"> <option>01</option><option>02 </option><option>03 </option><option>04 </option><option>05 </option><option>06 </option><option>07 </option><option>08 </option><option>09 </option><option>10 </option><option>11 </option><option>12 </option> </select> 
<select name="y"><option>2011</option><option>2012</option><option>2013</option><option>2014</option><option>2015</option><option>2016</option><option>2017</option><option>2018</option></select>
<p></p>
<br />
<input type="submit" value="submit" /> 
<input type="reset" value="reset" />
</div>
</div>
</div>
</form>
<div id="footer">
		<ul>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li><a href="index.html">Home Page</a>|</li>
			<li><a href="AboutUs.html">Company Profile</a>|</li>
			<li><a href="tours.html">Tours and Packages</a>|</li>
			<li><a href="Visa.html">Visa Procedures & Assistance</a>|</li>
    <li><a href="Bookings.html">Bookings</a>|</li>
			<li><a href="Feedback.html">Feedback</a>|</li>
			<li><a href="Sitemap.html">Sitemap</a>|</li>
			<li><a href="Tripplanner.html">Trip Planner</a>|</li>
		</ul>
																																																					
	</div>
    
    
    
</body>
</html>
